<template>
	<view class="content">
		<text class="title" v-html="title"></text>
		<view class="meta_content">
			<text class="name">华夏基金财富家</text>
			<text class="time" v-html="time">4天前</text>
		</view>
		<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	import {
		advertisingInforamtion
	} from '@/api/merchant';
	export default {
		data() {
			return {
				title:'',
				content:'',
				time:'',
			};
		},
		async onLoad(options) {
			var _this = this;
			var touristId = uni.getStorageSync('tourist_id');
			advertisingInforamtion({
				touristId:touristId,
				id:options.id
			}).then(res => {
				if(res.code == 1){
					_this.title = res.data.title;
					_this.content = res.data.content;
					_this.time = res.data.create_time;
					uni.setNavigationBarTitle({
					    title: res.data.title
					});
				}
			})
		},
	}
</script>

<style lang="scss">
	uni-page-body{
		height: 100%;
	}
	.content{
		background-color: #fff;
		padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
		.title{
			font-size: 44rpx;
			line-height: 1.4;
			margin-bottom: 28rpx;
			font-weight: 400;
			display: block;
		}
		.meta_content{
			margin-bottom: 44rpx;
			line-height: 40rpx;
			.name,.time{
				display: inline-block;
				vertical-align: middle;
				margin: 0 10px 10px 0;
				font-size: 15px;
			}
			.name{
				color: #576b95;
			}
			.time{
				color: rgba(0,0,0,0.3);
			}
		}
	}
</style>
